/**
 * Created by Administrator on 2017/2/8 0008.
 */
import {connect} from 'react-redux'
import {CounterWidget} from '../component/App'
import {decreaseAction} from '../action/index'
import {increaseAction} from '../action/index'
export const mapStateToProps = (state)=>{
    return {
        count:state.count
    }
}
export const mapDispatchToProps = (dispatch) =>{
    return {
        onIncreaseClick:()=>{
            dispatch(increaseAction)},
        onDecreaseClick:()=>{
            dispatch(decreaseAction)
        }
    }
}
export const CounterApp=connect(mapStateToProps,mapDispatchToProps)(CounterWidget)
